package com.example.dell.fastshopping.Trade;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.example.dell.fastshopping.R;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class ExtralSuccessActivity extends AppCompatActivity {
    @BindView(R.id.back)
    ImageView back;
    @BindView(R.id.title)
    TextView title;
    @BindView(R.id.num)
    TextView num;
    @BindView(R.id.money)
    TextView money;
    @BindView(R.id.back_buttton)
    TextView backButtton;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_extra_success);
        ButterKnife.bind(this);
        title.setText("提现成功");
        Intent intent = getIntent();
        String alipay_num = intent.getStringExtra("alipay_num");
        String extral_num = intent.getStringExtra("extral_num");
        money.setText(extral_num);
        if (alipay_num.length() > 3) {
            num.setText(alipay_num.substring(0, 3) + "***");
        } else {
            num.setText(alipay_num);
        }
    }

    @OnClick({R.id.back, R.id.back_buttton})
    public void onViewClicked(View view) {
        finish();
    }
}
